Get the list of members in "Dynamic distribution group"
Hi, How to get the list of group members in "Dynamic Distribution Group" with their Primary smtp address. Senthil KR
February 3rd, 2010 7:50am

Senthil, Try thisThis can be done from ADUC , where as you can create a query to get all the users and then from add and remove coloumn , you can add email address and then export the list to a csv file.If you have the Saved query folder in teh Active Directory Users and computers Snap-in then you can do this:1. Right-Click the folder and select New query2. Give it a descriptive name3. Click Define Query4. From the drop down list select Custom Search5. Clcik Advanced tab6. Paste in the following:(&(objectCategory=user)(memberOf=cn=Domain Admins,cn=users,dc=YourDomain,dc=local))You will need to change the cn=..... part to suite your groups distinguished name.then once you save this and get a list you can:7. Right-click on your query 8. Select Export List (not Export Query definition as this just creates a backup of the query)9. Select from the save as type: Text (Comma Delimited) (*.csv)Which of course, opens in Excel as it is.Raj
Free Windows Admin Tool Kit Click here and download it now
February 3rd, 2010 7:56am

Hi Rajnish, Thanks for reply. Need to export list of members with their primary smtp address for existing "Query based group mail id". I use the following shell command to export the same. $members = Get-DynamicDistributionGroup -Identity "dynamicgroupname" Get-Recipient -RecipientPreviewFilter $members.RecipientFilter > membersall.txt It gives me the list of members with their name. I need their email address. Please help me in this. where as i've tried your suggestion in ADUC. Its not listing the members. I get only empty excel sheet with columns " Name, Type & Descrption". Regards, Senthil KR
February 3rd, 2010 8:44am

You need add the coloumn and then add the email addresses from there. By default it will always show the above three fields.Raj
Free Windows Admin Tool Kit Click here and download it now
February 3rd, 2010 8:59am

How can i add the column and where? Senthil KR
February 3rd, 2010 10:44am

Check this script if this helps http://exchangepedia.com/blog/2005/09/how-to-export-all-email-addresses-from.htmlFor adding email address coloumn, go to ADUC, Click on view , add/remove coloumn and then scroll down to email address and add it.Raj
Free Windows Admin Tool Kit Click here and download it now
February 3rd, 2010 11:50am

Hi Rajnish,Thanks for reply.Need to export list of members with their primary smtp address for existing "Query based group mail id". I use the following shell command to export the same.$members = Get-DynamicDistributionGroup -Identity "dynamicgroupname"Get-Recipient -RecipientPreviewFilter $members.RecipientFilter > membersall.txtIt gives me the list of members with their name. I need their email address. Please help me in this.where as i've tried your suggestion in ADUC. Its not listing the members. I get only empty excel sheet with columns " Name, Type & Descrption".Regards,Senthil KR Hi Senthil,Add this "| select Displayname,PrimarySmtpAddress"$members = Get-DynamicDistributionGroup -Identity "dynamicgroupname"Get-Recipient -RecipientPreviewFilter $members.RecipientFilter | select Displayname,PrimarySmtpAddress > membersall.txtFrank Wang
February 3rd, 2010 12:38pm

Thanks Frank... Its working fine. Great work... Senthil KR
Free Windows Admin Tool Kit Click here and download it now
February 3rd, 2010 1:45pm

aaaarghhh.......This has been of tremendous help.Great work Frank.Wang
May 8th, 2010 2:08pm

Senthil i think you are getting full list of users in your exchange organization.... it is not filtered...check your resultset. sanjay
Free Windows Admin Tool Kit Click here and download it now
July 27th, 2010 4:40am

I get this error in Powershell Get-Recipient : Cannot validate argument on parameter 'RecipientPreviewFilter'. The argument is null or empty. Supply an argument that is not null or empty an d then try the command again. At line:1 char:108 + $members = Get-DynamicDistributionGroup -Identity "GroupName" | Get-Rec ipient -RecipientPreviewFilter <<<< $members.RecipientFilter > membersall.txt + CategoryInfo : InvalidData: (:) [Get-Recipient], ParameterBindi ngValidationException + FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.Excha nge.Management.RecipientTasks.GetRecipient We have populated the members of the Distribution group using a custom attibute. Any idea what we might be doing wrong while running the command
July 24th, 2011 4:37am

On Sun, 24 Jul 2011 08:32:14 +0000, Kitaab wrote: > > >I get this error in Powershell > >Get-Recipient : Cannot validate argument on parameter 'RecipientPreviewFilter'. The argument is null or empty. Supply an argument that is not null or empty an d then try the command again. At line:1 char:108 + $members = Get-DynamicDistributionGroup -Identity "GroupName" | Get-Rec ipient -RecipientPreviewFilter <<<< $members.RecipientFilter > membersall.txt + CategoryInfo : InvalidData: (:) [Get-Recipient], ParameterBindi ngValidationException + FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.Excha nge.Management.RecipientTasks.GetRecipient > >We have populated the members of the Distribution group using a custom attibute. > >Any idea what we might be doing wrong while running the command You're piping the results of the get-dynamicdistributiongroup into the get-recipient. Then you're trying to use an undefined "$members" variable. Two separate statements will work: $members = Get-DynamicDistributionGroup -Identity "GroupName" Get-Recipient -RecipientPreviewFilter $members.recipientpreviewfilter If you want them on one line, separate them with a semicolon. --- Rich Matheisen MCSE+I, Exchange MVP --- Rich Matheisen MCSE+I, Exchange MVP
Free Windows Admin Tool Kit Click here and download it now
July 24th, 2011 12:13pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics